
import re
import base64
import hashlib
from decimal import Decimal

def decrypt1(data:str):
    key = 'cd9d86dd286a0b0079146c1c57e51576'
    x = 0
    data = base64.b64decode(data.encode())
    length = len(data)
    l = len(key)
    char = string = ''
    for i in range(length):
        if(x == l):
            x = 0
        char += key[x]
        x += 1
    for i in range(length):
        string += chr(data[i] - (ord(char[i])) % 256)
    return int(string)

def decrypt(data,):
    key = 'jyzg123456'
    key = hashlib.md5(key.encode()).hexdigest()
    x = 0
    length_data = len(data)  # 注意这里的长度是指解码后的数据长度
    length_key = len(key)
    char = ''
    str_decrypted = ''

    # 将 Base64 编码的数据解码回原始字符串
    data = base64.b64decode(data.encode())

    # 生成一个字符串，通过重复密钥直到其长度与数据长度相同
    while len(char) < length_data:
        char += key[x]
        x = (x + 1) % length_key

    # 对每个字符进行解密
    for i in range(length_data):
        # 解密字符并添加到解密字符串中
        try:
            decrypted_char = chr(data[i] - ord(char[i]) % 256)
            str_decrypted += decrypted_char
        except:
            continue
    return (str_decrypted)

hl = [0.04,0.06,0.05,0.07,0.10,0.15,0.17,0.23,0.22,0.25,0.29,0.20,0.28,0.33,0.35,0.35,0.37]

a1=[]
flag=0
with open("1.txt","r",encoding='utf-8') as f:
    for i in f.readlines():
        tmp=i.strip().split(",")
        if tmp[5].strip()=='5' and tmp[6].strip()=='3':
            re1=re.search("\w+",tmp[7])[0]
            tmp1 = decrypt(re1)
            tmp2 = str(hl[int(tmp[4][10:12])-2])
            tmp3=Decimal(tmp1)*Decimal(tmp2)
            flag+=tmp3
print(flag)



